\(\int x^2 (a+b \arctan (\frac {c}{x})) \, dx\) [133]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 14, antiderivative size = 43 \[ \int x^2 \left (a+b \arctan \left (\frac {c}{x}\right )\right ) \, dx=\frac {1}{6} b c x^2+\frac {1}{3} x^3 \left (a+b \arctan \left (\frac {c}{x}\right )\right )-\frac {1}{6} b c^3 \log \left (c^2+x^2\right ) \]

[Out]

1/6*b*c*x^2+1/3*x^3*(a+b*arctan(c/x))-1/6*b*c^3*ln(c^2+x^2)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {4946, 269, 272, 45} \[ \int x^2 \left (a+b \arctan \left (\frac {c}{x}\right )\right ) \, dx=\frac {1}{3} x^3 \left (a+b \arctan \left (\frac {c}{x}\right )\right )-\frac {1}{6} b c^3 \log \left (c^2+x^2\right )+\frac {1}{6} b c x^2 \]

[In]

Int[x^2*(a + b*ArcTan[c/x]),x]

[Out]

(b*c*x^2)/6 + (x^3*(a + b*ArcTan[c/x]))/3 - (b*c^3*Log[c^2 + x^2])/6

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 269

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[x^(m + n*p)*(b + a/x^n)^p, x] /; FreeQ[{a, b, m
, n}, x] && IntegerQ[p] && NegQ[n]

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 4946

Int[((a_.) + ArcTan[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)*((a + b*ArcTan[c*x^
n])^p/(m + 1)), x] - Dist[b*c*n*(p/(m + 1)), Int[x^(m + n)*((a + b*ArcTan[c*x^n])^(p - 1)/(1 + c^2*x^(2*n))),
x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0] && (EqQ[p, 1] || (EqQ[n, 1] && IntegerQ[m])) && NeQ[m, -1]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{3} x^3 \left (a+b \arctan \left (\frac {c}{x}\right )\right )+\frac {1}{3} (b c) \int \frac {x}{1+\frac {c^2}{x^2}} \, dx \\ & = \frac {1}{3} x^3 \left (a+b \arctan \left (\frac {c}{x}\right )\right )+\frac {1}{3} (b c) \int \frac {x^3}{c^2+x^2} \, dx \\ & = \frac {1}{3} x^3 \left (a+b \arctan \left (\frac {c}{x}\right )\right )+\frac {1}{6} (b c) \text {Subst}\left (\int \frac {x}{c^2+x} \, dx,x,x^2\right ) \\ & = \frac {1}{3} x^3 \left (a+b \arctan \left (\frac {c}{x}\right )\right )+\frac {1}{6} (b c) \text {Subst}\left (\int \left (1-\frac {c^2}{c^2+x}\right ) \, dx,x,x^2\right ) \\ & = \frac {1}{6} b c x^2+\frac {1}{3} x^3 \left (a+b \arctan \left (\frac {c}{x}\right )\right )-\frac {1}{6} b c^3 \log \left (c^2+x^2\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.12 \[ \int x^2 \left (a+b \arctan \left (\frac {c}{x}\right )\right ) \, dx=\frac {1}{6} b c x^2+\frac {a x^3}{3}+\frac {1}{3} b x^3 \arctan \left (\frac {c}{x}\right )-\frac {1}{6} b c^3 \log \left (c^2+x^2\right ) \]

[In]

Integrate[x^2*(a + b*ArcTan[c/x]),x]

[Out]

(b*c*x^2)/6 + (a*x^3)/3 + (b*x^3*ArcTan[c/x])/3 - (b*c^3*Log[c^2 + x^2])/6

Maple [A] (verified)

Time = 1.01 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.09

method result size
parallelrisch \(-\frac {b \,c^{3} \ln \left (c^{2}+x^{2}\right )}{6}+\frac {b \,x^{3} \arctan \left (\frac {c}{x}\right )}{3}+\frac {x^{3} a}{3}+\frac {b c \,x^{2}}{6}-\frac {b \,c^{3}}{6}\) \(47\)
parts \(\frac {x^{3} a}{3}-b \,c^{3} \left (-\frac {x^{3} \arctan \left (\frac {c}{x}\right )}{3 c^{3}}+\frac {\ln \left (1+\frac {c^{2}}{x^{2}}\right )}{6}-\frac {x^{2}}{6 c^{2}}-\frac {\ln \left (\frac {c}{x}\right )}{3}\right )\) \(57\)
derivativedivides \(-c^{3} \left (-\frac {a \,x^{3}}{3 c^{3}}+b \left (-\frac {x^{3} \arctan \left (\frac {c}{x}\right )}{3 c^{3}}+\frac {\ln \left (1+\frac {c^{2}}{x^{2}}\right )}{6}-\frac {x^{2}}{6 c^{2}}-\frac {\ln \left (\frac {c}{x}\right )}{3}\right )\right )\) \(61\)
default \(-c^{3} \left (-\frac {a \,x^{3}}{3 c^{3}}+b \left (-\frac {x^{3} \arctan \left (\frac {c}{x}\right )}{3 c^{3}}+\frac {\ln \left (1+\frac {c^{2}}{x^{2}}\right )}{6}-\frac {x^{2}}{6 c^{2}}-\frac {\ln \left (\frac {c}{x}\right )}{3}\right )\right )\) \(61\)
risch \(\text {Expression too large to display}\) \(692\)

[In]

int(x^2*(a+b*arctan(c/x)),x,method=_RETURNVERBOSE)

[Out]

-1/6*b*c^3*ln(c^2+x^2)+1/3*b*x^3*arctan(c/x)+1/3*x^3*a+1/6*b*c*x^2-1/6*b*c^3

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.93 \[ \int x^2 \left (a+b \arctan \left (\frac {c}{x}\right )\right ) \, dx=\frac {1}{3} \, b x^{3} \arctan \left (\frac {c}{x}\right ) - \frac {1}{6} \, b c^{3} \log \left (c^{2} + x^{2}\right ) + \frac {1}{6} \, b c x^{2} + \frac {1}{3} \, a x^{3} \]

[In]

integrate(x^2*(a+b*arctan(c/x)),x, algorithm="fricas")

[Out]

1/3*b*x^3*arctan(c/x) - 1/6*b*c^3*log(c^2 + x^2) + 1/6*b*c*x^2 + 1/3*a*x^3

Sympy [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.95 \[ \int x^2 \left (a+b \arctan \left (\frac {c}{x}\right )\right ) \, dx=\frac {a x^{3}}{3} - \frac {b c^{3} \log {\left (c^{2} + x^{2} \right )}}{6} + \frac {b c x^{2}}{6} + \frac {b x^{3} \operatorname {atan}{\left (\frac {c}{x} \right )}}{3} \]

[In]

integrate(x**2*(a+b*atan(c/x)),x)

[Out]

a*x**3/3 - b*c**3*log(c**2 + x**2)/6 + b*c*x**2/6 + b*x**3*atan(c/x)/3

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.00 \[ \int x^2 \left (a+b \arctan \left (\frac {c}{x}\right )\right ) \, dx=\frac {1}{3} \, a x^{3} + \frac {1}{6} \, {\left (2 \, x^{3} \arctan \left (\frac {c}{x}\right ) - {\left (c^{2} \log \left (c^{2} + x^{2}\right ) - x^{2}\right )} c\right )} b \]

[In]

integrate(x^2*(a+b*arctan(c/x)),x, algorithm="maxima")

[Out]

1/3*a*x^3 + 1/6*(2*x^3*arctan(c/x) - (c^2*log(c^2 + x^2) - x^2)*c)*b

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.60 \[ \int x^2 \left (a+b \arctan \left (\frac {c}{x}\right )\right ) \, dx=\frac {{\left (2 \, b c^{4} \arctan \left (\frac {c}{x}\right ) - \frac {b c^{7} \log \left (\frac {c^{2}}{x^{2}} + 1\right )}{x^{3}} + \frac {2 \, b c^{7} \log \left (\frac {c}{x}\right )}{x^{3}} + 2 \, a c^{4} + \frac {b c^{5}}{x}\right )} x^{3}}{6 \, c^{4}} \]

[In]

integrate(x^2*(a+b*arctan(c/x)),x, algorithm="giac")

[Out]

1/6*(2*b*c^4*arctan(c/x) - b*c^7*log(c^2/x^2 + 1)/x^3 + 2*b*c^7*log(c/x)/x^3 + 2*a*c^4 + b*c^5/x)*x^3/c^4

Mupad [B] (verification not implemented)

Time = 0.37 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.93 \[ \int x^2 \left (a+b \arctan \left (\frac {c}{x}\right )\right ) \, dx=\frac {a\,x^3}{3}+\frac {b\,x^3\,\mathrm {atan}\left (\frac {c}{x}\right )}{3}-\frac {b\,c^3\,\ln \left (c^2+x^2\right )}{6}+\frac {b\,c\,x^2}{6} \]

[In]

int(x^2*(a + b*atan(c/x)),x)

[Out]

(a*x^3)/3 + (b*x^3*atan(c/x))/3 - (b*c^3*log(c^2 + x^2))/6 + (b*c*x^2)/6